﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ggprot
{
    class ImgRequest
    {
        private byte flag;
        private int size;
        private int crc32;

        public byte Flag
        {
            get { return flag; }
            set { flag = value; }
        }

        public int Size
        {
            get { return size; }
            set { size = value; }
        }

        public int Crc32
        {
            get { return crc32; }
            set { crc32 = value; }
        }

        public byte[] GetBytes()
        {
            byte[] bytes = new byte[9];
            BitConverter.GetBytes(flag).CopyTo(bytes, 0);
            BitConverter.GetBytes(size).CopyTo(bytes, 1);
            BitConverter.GetBytes(crc32).CopyTo(bytes, 4);

            return bytes;
        }
    }
}
